import 'package:flutter/material.dart';

class MyApp10 extends StatelessWidget {
  const MyApp10({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: const Text(
            '布局组件使用',
            style: TextStyle(color: Colors.white),
          ),
          backgroundColor: Colors.purple,
          centerTitle: true,
        ),
        body: Center(
          child: Container(
            height: 100,
            color: Colors.cyan,
            child: Row(
              children: [
                Expanded(
                  flex: 3,
                  child: 
                  Container(
                    height: 86,
                    color: Colors.red,
                  )
                ),
                Expanded(
                  flex: 5,
                  child: Container(
                    height: 86,
                    color: Colors.green,
                  )
                ),
                Expanded(
                   flex: 1,
                  child: Container(
                    height: 86,
                    color: Colors.blue,
                  )
                ),
              ],
            ),
          ),
        )
    );
  }
}
